(function (define) {
    define([''], function () {
        var SharedAppData = function (Restangular) {
            var awards = {},
                bookChapter = {},
                conference = {},
                editorship = {},
                grants = {},
                journal = {},
                lab = {},
                paperReviewers = {},
                personalData = {},
                professional = {},
                selectedProject = {},
                students = {},
                teaching = {};


            Restangular.all('awards.json').getList().then(function(result){
                console.log("a");
                awards = result;
            });

            Restangular.all('bookChapter.json').getList().then(function(result){
                bookChapter = result;
            });

            Restangular.all('conference.json').getList().then(function(result){
                conference = result;
            });

            Restangular.all('editorship.json').getList().then(function(result){
                editorship = result;
            });

            Restangular.all('grants.json').getList().then(function(result){
                grants = result;
            });

            Restangular.all('journal.json').getList().then(function(result){
                lab = result;
            });

            Restangular.all('lab.json').getList().then(function(result){
                navs = result;
            });

            Restangular.all('paperReviewers.json').getList().then(function(result){
                paperReviewers = result;
            });

            Restangular.all('personalData.json').getList().then(function(result){
                personalData = result;
            });

            Restangular.all('professional.json').getList().then(function(result){
                professional = result;
            });

            Restangular.all('selectedProject.json').getList().then(function(result){
                selectedProject = result;
            });

            Restangular.all('students.json').getList().then(function(result){
                students = result;
            });

            Restangular.all('teaching.json').getList().then(function(result){
                teaching = result;
            });


            return {
                awards: awards,
                bookChapter: bookChapter,
                conference: conference,
                editorship: editorship,
                grants: grants,
                journal: journal,
                lab: lab,
                paperReviewers: paperReviewers,
                personalData: personalData,
                professional: professional,
                selectedProject: selectedProject,
                students: students,
                teaching: teaching
            };
        };

        return [ "Restangular", SharedAppData ];
    });
}(define));